package model

type SysSqlparamOption struct {
	DcModel
	SqlparamCode string `gorm:"comment:SQL参数编码;not null;" json:"sqlparam_code"`
	Option       string `gorm:"type:text;not null;index" json:"option"`
}

type SysSqlparamOptionRes struct {
	Constraint string ` json:"constraint"`
	Option     string ` json:"option"`
}

/*
create or replace view datacenter.orgoption2023 as
select distinct null "constraint",mkt_area_name "option",'mkt_area' "level" from hx.tb_b_dim_region
union all select distinct mkt_area_name "constraint",dept_name "option",'dept' "level" from hx.tb_b_dim_region
          union all select distinct mkt_area_name||dept_name "constraint",duty_zone_name "option",'duty_zone' "level" from hx.tb_b_dim_region
                    union all select distinct mkt_area_name||dept_name||duty_zone_name "constraint",region_name "option",'region' "level" from hx.tb_b_dim_region
*/

type OrgOption struct {
	Constraint string `json:"constraint"`
	Option     string `json:"option"`
	Level      string `json:"level"`
}
